var price= 5000;
var month = prompt("请输入月份",'');
var cw = prompt("请输入舱位1、头等舱 2、经济舱",'');
var discount = 1;
if(month >= 4 && month <= 10 ){//旺季
    if(cw == 1){//头等舱
        discount = 0.9;
    }else if(cw == 2){//经济舱
        discount = 0.6;
    }
}else if(month == 1 || month == 2 || month == 3 || month == 11 || month == 12){//淡季
    if(cw == 1){//头等舱
        discount = 0.5;
    }else if(cw == 2){//经济舱
        discount = 0.4;
    }
}
var money = price * discount;
alert("实际支付：" + money);